Skip to content

Conversation

@sanjeevamk1
Copy link

@sanjeevamk1 sanjeevamk1 commented Jan 21, 2026

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

Problem:
For token streaming when adk agent is exposed with to_a2a

Solution:
Added streaming_mode in to_a2a to select streaming while exposing the agent

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @sanjeevamk1, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the to_a2a utility by integrating streaming support, allowing for more dynamic and efficient handling of agent responses. By introducing a StreamingMode and a configurable request converter, users can now specify how data is streamed when an ADK agent is converted into an A2A Starlette application, providing greater flexibility for interactive and real-time agent interactions.

Highlights

  • Streaming Mode Introduction: Introduced a new StreamingMode enum to control how agent responses are streamed.
  • Configurable Request Converter: Added a new experimental function create_request_converter that allows generating a request converter configured with a specific StreamingMode.
  • Streaming Support in to_a2a: The to_a2a utility function now accepts a streaming_mode parameter, enabling the configuration of streaming behavior when converting an ADK agent to an A2A Starlette application.
  • Executor Configuration Update: The A2aAgentExecutor within to_a2a is now initialized with an A2aAgentExecutorConfig, which incorporates the streaming-aware request converter.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@adk-bot
Copy link
Collaborator

adk-bot commented Jan 21, 2026

Response from ADK Triaging Agent

Hello @sanjeevamk1, thank you for creating this PR!

To help reviewers understand and evaluate your contribution, could you please fill out the pull request template in the description? Specifically, please provide the following:

  • Link to Issue or Description of Change: Please either link to the relevant issue or provide a description of the problem and your solution.
  • Testing Plan: Describe the tests you ran to verify your changes, including any unit tests or manual end-to-end tests.
  • Checklist: Please fill out the checklist to confirm you've followed the contribution guidelines.

This information is crucial for an efficient review process. You can find more details in our contribution guide.

Thanks!

@adk-bot adk-bot added the live [Component] This issue is related to live, voice and video chat label Jan 21, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces streaming support for the to_a2a function. The implementation approach is sound, but I've identified a critical issue with a shadowed import that will likely lead to runtime failures. Additionally, there's an opportunity to improve maintainability by addressing significant code duplication in the new request converter. I've also pointed out a minor typo. Please review my comments for details.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@sanjeevamk1 sanjeevamk1 changed the title feat: implement streaming support in to_a2a for issue #640 feat: implement streaming support in to_a2a for issue #4240 Jan 22, 2026
@ryanaiagent ryanaiagent self-assigned this Jan 23, 2026
@ryanaiagent ryanaiagent added the request clarification [Status] The maintainer need clarification or more information from the author label Jan 23, 2026
@ryanaiagent
Copy link
Collaborator

H @sanjeevamk1, Thank you for your contribution! We appreciate you taking the time to submit this pull request. Can you address the comment and also fix the formatting errors before we can proceed with the review. You can use autoformat.sh for formatting errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

live [Component] This issue is related to live, voice and video chat request clarification [Status] The maintainer need clarification or more information from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSE Streaming providing to to_a2a

3 participants